#include "StdAfx.h"
#include "tabla_simbolos.h"


tabla_simbolos::tabla_simbolos(void)
{
}


tabla_simbolos::~tabla_simbolos(void)
{
}

item_ts* tabla_simbolos::get(string id){
	for(int i=0;i<(int)this->table_ts.size();i++){
		if(this->table_ts.at(i)->getId().compare(id)==0){
			return this->table_ts.at(i);
		}
	}
	return 0;
}

vector<item_ts*> tabla_simbolos::getALL(string id){
	vector<item_ts*> temp;
	for(int i=0;i<(int)this->table_ts.size();i++){
		if(this->table_ts.at(i)->getId().compare(id)==0){
			temp.push_back( this->table_ts.at(i));
		}
	}
	return temp;
}

bool tabla_simbolos::additem(item_ts* item){

		this->table_ts.push_back(item);

		return true;
	
}
